package com.resys.service;

import java.time.LocalDateTime;
import java.util.List;

import com.resys.entity.query.CustomerQuery;
import com.resys.entity.po.Customer;
import com.resys.entity.vo.PaginationResultVO;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;


/**
 *  业务接口
 */
public interface CustomerService {

	/**
	 * 根据条件查询列表
	 */
	List<Customer> findListByParam(CustomerQuery param);

	/**
	 * 根据条件查询列表
	 */
	Integer findCountByParam(CustomerQuery param);

	/**
	 * 分页查询
	 */
	PaginationResultVO<Customer> findListByPage(CustomerQuery param);

	/**
	 * 新增
	 */
	Integer add(Customer bean);

	/**
	 * 批量新增
	 */
	Integer addBatch(List<Customer> listBean);

	/**
	 * 批量新增/修改
	 */
	Integer addOrUpdateBatch(List<Customer> listBean);

	/**
	 * 多条件更新
	 */
	Integer updateByParam(Customer bean,CustomerQuery param);

	/**
	 * 多条件删除
	 */
	Integer deleteByParam(CustomerQuery param);

	/**
	 * 根据CustomerId查询对象
	 */
	Customer getCustomerByCustomerId(String customerId);


	/**
	 * 根据CustomerId修改
	 */
	Integer updateCustomerByCustomerId(Customer bean,String customerId);


	/**
	 * 根据CustomerId删除
	 */
	Integer deleteCustomerByCustomerId(String customerId);


	/**
	 * 根据ClientName查询对象
	 */
	Customer getCustomerByClientName(String clientName);


	/**
	 * 根据ClientName修改
	 */
	Integer updateCustomerByClientName(Customer bean,String clientName);


	/**
	 * 根据ClientName删除
	 */
	Integer deleteCustomerByClientName(String clientName);

	void register(String company,@NotEmpty String phone, @NotEmpty @Size(max = 20) String userName, @NotEmpty String registerPassword, String realName);
	Integer getCountLogin(LocalDateTime start, LocalDateTime end);
}